<%--
  Created by IntelliJ IDEA.
  User: pc
  Date: 2025/9/2
  Time: 10:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>基础菜单 - Layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="./statics/layui/css/layui.css" rel="stylesheet">
</head>
<style>
    #two{
       position: relative;
       left: 270px;
    }
</style>
<body class="layui-bg-gray">
<div class="layui-panel" style="width: 260px; margin: 16px;">
    <ul class="layui-menu" id="demo-menu">
        <c:forEach var="menus" items="${sessionScope.menusAll}" varStatus="s" >
            <li class="layui-menu-body-title"><a href="${menus.hrefUrl}&&pid=${menus.id}" target="one">${menus.mName}</a></li>
        </c:forEach>
    </ul>
    <div>
        <c:forEach var="btn" items="${sessionScope.menusBtn}" varStatus="s">
            ${btn.hrefUrl}
        </c:forEach>
    </div>
    <div id="two">
        <iframe name="one" width="700px" height="500px"></iframe>
    </div>
</div>
<script src="./statics/layui/layui.js"></script>
<script>
    layui.use(function(){
        var dropdown = layui.dropdown;
        var layer = layui.layer;
        var util = layui.util;
        // 菜单点击事件
        dropdown.on('click(demo-menu)', function(options){
            //console.log(this, options);

            // 显示 - 仅用于演示
            //layer.msg(util.escape(JSON.stringify(options)));
        });
    });
</script>
</body>
</html>
